import { createApp } from 'vue';
import pinia from '/@/stores/index';
import App from './App.vue';
import router from './router';
import { directive } from '/@/directive/index';
import { i18n } from '/@/i18n/index';
import other from '/@/utils/other';
import axios  from "axios";
import ElementPlus from 'element-plus';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import 'element-plus/dist/index.css';
import '/@/theme/index.scss';
import Avue from '@smallwei/avue';
import '@smallwei/avue/lib/index.css';
import zhLocale from '@smallwei/avue/lib/locale/lang/zh'
import enLocale from '@smallwei/avue/lib/locale/lang/en'
import VueGridLayout from 'vue-grid-layout';
import * as tools from '/@/utils/tools';

const app = createApp(App);
app.provide('$tools', tools);
directive(app);
other.elSvg(app);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(pinia).use(router).use(ElementPlus, { i18n: i18n.global.t }).use(i18n).use(Avue,{axios,locale:enLocale}).use(VueGridLayout).mount('#app');
